package com.huike.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.huike.entity.Rotation;
import com.huike.service.IRotationService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lwen
 * @since 2019-11-12
 */
@RestController
@RequestMapping("/rotation")
public class RotationController {

	@Autowired
	IRotationService iRotationService;
	
	/**
	 * 获取后台数据中的所有轮播图信息，并展示在首页
	 * @return
	 */
	@RequestMapping("/getRotationAction")
    @ResponseBody
    public List<Rotation> getRotationAction(){
		
		List<Rotation> rotations = iRotationService.list();
		
		return rotations; 
	}
	
	
}
